# 两种不同的启动子launch的方式

from launch import LaunchDescription
from launch.actions import IncludeLaunchDescription
from ament_index_python.packages import get_package_share_directory
from launch.launch_description_sources import PythonLaunchDescriptionSource

def generate_launch_description():
    colors = {"background_r":"200"}

    return LaunchDescription([
        IncludeLaunchDescription(
            PythonLaunchDescriptionSource([
                get_package_share_directory("launch_demo"),
                "/launch/",
                "child.py"
            ]),
            launch_arguments={
                "new_background_r" : colors["background_r"]
            }.items()
        )
    ])